<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/>
    <title>求职意向</title>
    <link rel="icon" type="image/png" href="/img/icon.png">
    <script type="text/javascript" src="/h5/newall/newall.js"></script>
    <link rel="stylesheet" type="text/css" href="/h5/newall/newall.css">

</head>

<div class="mui-content-padded H5body basedata">
    <div class="topmsg">
        <p class="msgtext">注册填写/上传的信息越全面，客户信任度越高</p>
    </div>
    <MCform id="Form" class="mctag" fromapi="getqiuzhiyixiang_gc">
        <MCtitle class="mctag">求职意向（工厂）</MCtitle>
        <div class="content">
            <h2 class="title">添加求职意向</h2>
            <p class="desc">请选择，选择不上限</p>
            <input type="hidden" mcname="qiuzhiyixiangArrayGC"/>
            <div class="contentUl show">
                <div class="titlediv">
                    <p class="title">面料种类</p>
                    <i class="xiangxiaIco"></i>
                </div>
                <ul v-if="qiuzhiyixiangArrayGC&&qiuzhiyixiangArrayGC.mianliaozhonglei"  class="selecttagul selecttagu2 zhenzhileideList">
                    <li v-for="(li,key) of qiuzhiyixiangArrayGC.mianliaozhonglei" class="tagli" :likey="key" ulname="mianliaozhonglei"
                        v-bind:class="{ 'on': li.on }">{{li.text}}
                    </li>
                </ul>
            </div>
            <div class="contentUl">
                <div class="titlediv">
                    <p class="title">技术等级</p>
                    <i class="xiangxiaIco"></i>
                </div>
                <ul v-if="qiuzhiyixiangArrayGC&&qiuzhiyixiangArrayGC.jishudengjiList"  class="selecttagul selecttagu2 zhenzhileideList">
                    <li v-for="(li,key) of  qiuzhiyixiangArrayGC.jishudengjiList" class="tagli" :likey="key" ulname="jishudengjiList"
                        v-bind:class="{ 'on': li.on }">{{li.text}}
                    </li>
                </ul>
            </div>
            <div class="contentUl">
                <div class="titlediv">
                    <p class="title">擅长技能</p>
                    <i class="xiangxiaIco"></i>
                </div>
                <ul v-if="qiuzhiyixiangArrayGC&&qiuzhiyixiangArrayGC.shanchangjinengList"  class="selecttagul selecttagu2 zhenzhileideList">
                    <li v-for="(li,key) of  qiuzhiyixiangArrayGC.shanchangjinengList" class="tagli" :likey="key" ulname="shanchangjinengList"
                        v-bind:class="{ 'on': li.on }">{{li.text}}
                    </li>
                </ul>
            </div>


            <button id="submit2" type="submit" mcname="disabled2"
                    class="mui-btn mui-btn-primary">完成
            </button>
        </div>
        <button id="submit" type="submit"
                class="mui-btn mui-btn-primary">
            保存
        </button>


    </MCform>
</div>

<script type="text/javascript" src="/h5/js/all2.js"></script>
</body>
<style>

</style>
<script>
    var view = new MC.View.MCform('#Form');

    $('.contentUl .titlediv').on('click',function () {
        var obj=$(this).parents('.contentUl');
        if(obj.hasClass('show')){
            obj.removeClass('show');
        }else{
            obj.addClass('show');
        }
    });
    $('.contentUl').on('click','[ulname]',function () {
        var obj=$(this);
        var name=obj.attr('ulname');
        var likey=obj.attr('likey');
        view.vue.qiuzhiyixiangArrayGC[name][likey].on=!view.vue.qiuzhiyixiangArrayGC[name][likey].on;
      //  console.log(obj,name,likey);
    });
    $('#submit').on('click',function(){
        var mianliaozhonglei=[];
        var jishudengjiList=[];
        var shanchangjinengList=[];
        for(var i=0;i<view.vue.qiuzhiyixiangArrayGC['mianliaozhonglei'].length;i++){
            if(view.vue.qiuzhiyixiangArrayGC['mianliaozhonglei'][i].on){
                mianliaozhonglei.push(view.vue.qiuzhiyixiangArrayGC['mianliaozhonglei'][i].text);
            }
        }
        for(var i=0;i<view.vue.qiuzhiyixiangArrayGC['jishudengjiList'].length;i++){
            if(view.vue.qiuzhiyixiangArrayGC['jishudengjiList'][i].on){
                jishudengjiList.push(view.vue.qiuzhiyixiangArrayGC['jishudengjiList'][i].text);
            }
        }
        for(var i=0;i<view.vue.qiuzhiyixiangArrayGC['shanchangjinengList'].length;i++){
            if(view.vue.qiuzhiyixiangArrayGC['shanchangjinengList'][i].on){
                shanchangjinengList.push(view.vue.qiuzhiyixiangArrayGC['shanchangjinengList'][i].text);
            }
        }
        MC.apiD('setqiuzhiyixiang_gc',{
            mianliaozhonglei:mianliaozhonglei.join(','),
            jishudengjiList:jishudengjiList.join(','),
            shanchangjinengList:shanchangjinengList.join(',')
        });
    });
</script>
</body>
</html>